package com.kinon.ogt.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 佛祖保佑 永无BUG
 *
 * @author 339
 * @date 2018/5/18
 */
public class User implements Parcelable {

    public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
        @Override
        public User createFromParcel(Parcel source) {
            return new User(source);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    private String id;
    private String phone;
    private String password;
    private String name;
    private String pic;
    private String openid;
    private String ogc;
    private String dew;
    private String invite_user;
    private String invite_code;
    private String regist_time;
    private String token;
    private double degree;

    public User() {
    }

    protected User(Parcel in) {
        this.id = in.readString();
        this.phone = in.readString();
        this.password = in.readString();
        this.name = in.readString();
        this.pic = in.readString();
        this.openid = in.readString();
        this.ogc = in.readString();
        this.dew = in.readString();
        this.invite_user = in.readString();
        this.invite_code = in.readString();
        this.regist_time = in.readString();
        this.token = in.readString();
        this.degree = in.readDouble();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOgc() {
        return ogc;
    }

    public void setOgc(String ogc) {
        this.ogc = ogc;
    }

    public String getDew() {
        return dew;
    }

    public void setDew(String dew) {
        this.dew = dew;
    }

    public String getInvite_user() {
        return invite_user;
    }

    public void setInvite_user(String invite_user) {
        this.invite_user = invite_user;
    }

    public String getInvite_code() {
        return invite_code;
    }

    public void setInvite_code(String invite_code) {
        this.invite_code = invite_code;
    }

    public String getRegist_time() {
        return regist_time;
    }

    public void setRegist_time(String regist_time) {
        this.regist_time = regist_time;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public double getDegree() {
        return degree;
    }

    public void setDegree(double degree) {
        this.degree = degree;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.phone);
        dest.writeString(this.password);
        dest.writeString(this.name);
        dest.writeString(this.pic);
        dest.writeString(this.openid);
        dest.writeString(this.ogc);
        dest.writeString(this.dew);
        dest.writeString(this.invite_user);
        dest.writeString(this.invite_code);
        dest.writeString(this.regist_time);
        dest.writeString(this.token);
        dest.writeDouble(this.degree);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", pic='" + pic + '\'' +
                ", openid='" + openid + '\'' +
                ", ogc='" + ogc + '\'' +
                ", dew='" + dew + '\'' +
                ", invite_user='" + invite_user + '\'' +
                ", invite_code='" + invite_code + '\'' +
                ", regist_time='" + regist_time + '\'' +
                ", token='" + token + '\'' +
                ", degree=" + degree +
                '}';
    }
}
